home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / wsvns.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  1.3 KB  |  41 lines

  1. /*******************************************************************************
  2.  *
  3.  *   wsvns.h
  4.  *
  5.  *   Windows Sockets include file for VINES IP.  This file contains all
  6.  *   standardized VINES IP information.  Include this header file after
  7.  *   winsock.h.
  8.  *
  9.  *   To open an VINES IP socket, call socket() with an address family of
  10.  *   AF_BAN, a socket type of SOCK_DGRAM, SOCK_STREAM, or SOCK_SEQPACKET,
  11.  *   and protocol of 0.
  12.  *
  13.  ******************************************************************************/
  14.  
  15. #ifndef _WSVNS_
  16. #define _WSVNS_
  17. #pragma option push -b
  18.  
  19.  
  20. /*
  21.  * Socket address, VINES IP style.  Address fields and port field are defined
  22.  * as a sequence of bytes.  This is done because they are byte ordered
  23.  * BIG ENDIAN, ala most significant byte first.
  24.  */
  25. typedef struct sockaddr_vns {
  26.     u_short sin_family;            // = AF_BAN
  27.     u_char  net_address[4];        // network address
  28.     u_char  subnet_addr[2];        // subnet address
  29.     u_char  port[2];            // msb=port[0], lsb=port[1]
  30.     u_char  hops;            // # hops for broadcasts
  31.     u_char  filler[5];            // filler, zeros
  32. } SOCKADDR_VNS, *PSOCKADDR_VNS, FAR *LPSOCKADDR_VNS;
  33.  
  34. #define VNSPROTO_IPC        1
  35. #define VNSPROTO_RELIABLE_IPC    2
  36. #define VNSPROTO_SPP        3
  37.  
  38.  
  39. #pragma option pop
  40. #endif _WSVNS_
  41.